#include "ScriptableInputHandler.hpp"

ScriptableInputHandler::ScriptableInputHandler(){

}

void ScriptableInputHandler::bind(lua_State* luaState){
    luabind::module(luaState)[
        luabind::class_<ScriptableInputHandler>("InputHandler")
            .def_readonly("leftPressed", &InputHandler::leftPressed)
            .def_readonly("rightPressed", &InputHandler::rightPressed)
            .def_readonly("leftDown", &InputHandler::leftDown)
            .def_readonly("rightDown", &InputHandler::rightDown)
            .def_readonly("leftReleased", &InputHandler::leftReleased)
            .def_readonly("rightReleased", &InputHandler::rightReleased)
            .def_readonly("doubleClick", &InputHandler::doubleClick)
            .def("isKeyPressed", &InputHandler::isKeyPressed)
    ];
}

void ScriptableInputHandler::push(lua_State* luaState){
    luabind::object o = luabind::object(luaState, this);
    o.push(luaState);
}